package edu.dlust.trading_platform.DataBase;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;



public class MySQL {
    public static Connection getConnection() {
        String strdrivername = "com.mysql.jdbc.Driver";
        String strdburl = "jdbc:mysql://frp.lsakura.top:8001/android";
        String strusername = "local";
        String strpassword = "123456";
        Connection conn = null;
        try {
            Class.forName(strdrivername);
            conn = DriverManager.getConnection(strdburl,strusername,strpassword);
            conn.setAutoCommit(true);
        } catch (ClassNotFoundException var6) {
            ClassNotFoundException e = var6;
            e.printStackTrace();
        } catch (SQLException var7) {
            SQLException e = var7;
            e.printStackTrace();
        }
        return conn;
    }
}
